<include file="public:header" />
<div class="pad_lr_10" >
    <form name="searchform" method="get">
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="account" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="tokenTall" value="{$search.tokenTall}" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
					账单单号:
                    <input name="billnum" type="text" class="input-text" size="25" value="{$search.billnum}" />
					&nbsp;&nbsp;
                                                     生成时间 :
                    <input type="text" name="time_start" id="J_time_start" class="date" size="12" value="{$search.time_start}">
                    -
                    <input type="text" name="time_end" id="J_time_end" class="date" size="12" value="{$search.time_end}">
					&nbsp;&nbsp;
          			状态 :  
		          	<select name="status" >
		          	<option value="">--所有--</option>
		          	<?php foreach($account_status as $key=>$item){ ?>
                    <option <?php if($search['status']==$key) echo "selected=''"; ?> value="<?php echo $key; ?>"><?php echo $item; ?></option>
                    <?php } ?>
		          	</select>
                    &nbsp;&nbsp;
                    <input type="submit" name="search" class="btn" value="搜索" />
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
    
    <div class="J_tablelist table_list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <!-- <th><span data-tdtype="order_by" data-field="id">ID</span></th> -->
                <th><span data-tdtype="order_by" data-field="billnum">账单单号</span></th>
                <th><span data-tdtype="order_by" data-field="status">状态</span></th>
                <th><span data-tdtype="order_by" data-field="gen_time">生成时间</span></th>
                <th><span data-tdtype="order_by" data-field="start_time">账单统计时间段</span></th>
                <th><span data-tdtype="order_by" data-field="totalamt">账单总金额(元)</span></th>
                <th><span data-tdtype="order_by" data-field="rate">扣率</span></th>
                <th><span data-tdtype="order_by" data-field="yingjie">应结金额(元)</span></th>
                <th width="80">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
            <volist name="list" id="val" >
            <tr>
                <!-- <td align="center">{$val.id}</td> -->
                <td align="center"><span data-tdtype="view" data-field="billnum" data-id="{$val.billnum}" class="tdview" >{$val.billnum}</span></td>
                <td align="center"><b><?php foreach($account_status as $key=>$item){ if($val['status']==$key){echo $item; }}?></b></td>
                <td align="center"><?php if($val['gen_time']){ echo date('Y-m-d H:i:s',$val['gen_time']); }?></td>
                <td align="center"><b><?php if($val['start_time']){ echo date('Y-m-d H:i:s',$val['start_time']); }?> -- <?php if($val['end_time']){ echo date('Y-m-d H:i:s',$val['end_time']); }?></b></td>
                <td align="center" class="red">{$val.totalamt}</td>
                <td align="center">{$val.rate}</td>
                <td align="center" class="red">{$val.yingjie}</td>
                <td align="center">
                <a href="{:U('account/edit', array('id'=>$val['id'], 'menuid'=>$menuid, 'tokenTall'=>$val['tokenTall'], 'status'=>$search['status']))}">查看和操作</a>
                </td>
            </tr>
            </volist>
    	</tbody>
    </table>
    </div>

    <div class="btn_wrap_fixed">
        <div id="pages">{$page}</div>
    </div>
</div>
<include file="public:footer" />

<script>
Calendar.setup({
	inputField : "J_time_start",
	ifFormat   : "%Y-%m-%d",
	showsTime  : false,
	timeFormat : "24"
});
Calendar.setup({
	inputField : "J_time_end",
	ifFormat   : "%Y-%m-%d",
	showsTime  : false,
	timeFormat : "24"
});
</script>
</body>
</html>